<?php

if (!defined('BASEPATH'))
	exit('No direct script access allowed');

/**
 * Init Model
 *
 */


class License_model extends CI_Model {

	function __construct(){
		parent::__construct();
	}
	
	function getLicense($profile_id=0){
	
		$sql = "select * from license where profile_id = $profile_id";
		$result=$this->db->query($sql)->result();
		if($result){
			return $result;
		}else{
			return false;
		}
	}
	
	function getLicenseinfo($id=NULL) {
		$sql = "select * from license where id=$id";
		$query = $this->db->query($sql);
		$row = $query->row();
		return $row;
	}
	
	function deleteLicense($id=NULL){
		$sql = "delete from license where id=$id";
		$this->db->query($sql);
	}
}